#include <string>

using namespace std;

class Solution
{
public:
    bool CheckPermutation(string s1, string s2)
    {
        char tmp[26] = {0};
        for (auto ch : s1)
        {
            tmp[ch - 'a']++;
        }
        for (auto ch : s2)
        {
            tmp[ch - 'a']--;
            if (tmp[ch - 'a'] < 0)
            {
                return false;
            }
        }
        return true;
    }
};